<?php /* Smarty version 2.6.26, created on 2010-11-13 18:09:46
         compiled from new_practice.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php if (isset ( $this->_tpl_vars['info'] )): ?>
	<div class="info i_red">
		<?php echo $this->_tpl_vars['info']; ?>

	</div>
<?php endif; ?>			
<?php if (isset ( $_SESSION['user_id'] )): ?>
<h3>Nowa oferta praktyki</h3>
<form action="new_practice.php" method="post">
	<div class="table_div">
		<table>
			<?php if ($_SESSION['user_type'] == 'user_company'): ?>
				<?php $_from = $_SESSION['company_info']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['company']):
?>
				<?php endforeach; endif; unset($_from); ?>
				<input type="hidden" name="company_id" id="company_id" value="<?php echo $this->_tpl_vars['company']['id']; ?>
"/>
				<tr>
					<td><label for="company_name" class= "label">Nazwa firmy</label></td>
					<td><p><?php echo $this->_tpl_vars['company']['name']; ?>
</p></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="company_address" class= "label">Adres</label></td>
					<td><p><?php echo $this->_tpl_vars['company']['address']; ?>
</p></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="company_phone" class= "label">Telefon</label></td>
					<td><p><?php echo $this->_tpl_vars['company']['phone']; ?>
</p></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="company_site" class= "label">Strona www</label></td>
					<td><p><a href="http:\\<?php echo $this->_tpl_vars['company']['site']; ?>
" target=_blank><?php echo $this->_tpl_vars['company']['site']; ?>
</p></a></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="company_person" class="label">Osoba reprezentująca</label></td>
					<td>
						<select id="company_person" name="company_person" class="input">
							<?php $_from = $this->_tpl_vars['company_persons']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['person']):
?> 
								<option value="<?php echo $this->_tpl_vars['person']['id']; ?>
"><?php echo $this->_tpl_vars['person']['name']; ?>
 <?php echo $this->_tpl_vars['person']['surname']; ?>
</option>
							<?php endforeach; endif; unset($_from); ?>
						</select>
					</td>
					<td></td>
				</tr>
				
			<?php endif; ?>
			<tr>
				<td><label for="date_start" class="label">Od dnia (RRRR-MM-DD)</label></td>
				<td><input type="text" id="date_start" name="date_start" class="input"/></td>
				<td></td>
			</tr>
			<tr>
				<td><label for="date_end" class="label">Do dnia (RRRR-MM-DD)</label></td>
				<td><input type="text" id="date_end" name="date_end" class="input"/></td>
				<td></td>
			</tr>
			<tr>
				<td><label for="amount" class="label">Ilość miejsc</label></td>
				<td><input type="text" id="amount" name="amount" class="input"/></td>
				<td></td>
			</tr>
			<tr>
				<td><label for="paid" class="label">Praktyka płatna?</label></td>
				<td style="vertical-align: middle";><input type="checkbox" id="paid" name="paid" /></td>
				<td></td>
			</tr>	
			<tr>
				<td><label for="duties" class="label">Zakres obowiązków</label></td>
				<td><textarea name="duties" id="duties" rows="5" cols="20" class="input"></textarea></td>
				<td></td>
			</tr>
			<tr>
				<td><label for="requirements" class="label">Wymagania</label></td>
				<td><textarea name="requirements" id="requirements" rows="5" cols="20" class="input"></textarea></td>
				<td></td>
			</tr>
			<tr>
				<td><label for="technology" class="label">Technologie</label></td>
				<td>
				<?php $_from = $this->_tpl_vars['technologies']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['tech']):
?>
					<input type="checkbox" name ="tech[]" id="tech_id_<?php echo $this->_tpl_vars['tech']['id']; ?>
" value="<?php echo $this->_tpl_vars['tech']['technology']; ?>
" /> <?php echo $this->_tpl_vars['tech']['technology']; ?>
 <br/>
				<?php endforeach; endif; unset($_from); ?>
				</td>
				<td></td>
			</tr>			

			<?php if ($_SESSION['user_type'] == 'user_student'): ?>
			
			<?php endif; ?>
			
		</table>
	</div>
	<div style="clear:both"></div>
	<input type="submit" value="Wyślij" id="send" name="send" class="button"/>
</form>
<?php endif; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>